'use strict';


//引入第三方包 开始
import Vue from 'vue';
//引入路由对象
//vuerouter
import Router from 'vue-router';
//vuerouter: 安装插件
Vue.use(Router);

//Axios:引入
import Axios from 'axios';
// import  VueJsonp  from  'vue-jsonp';
// Vue.use(VueJsonp);

//挂载原型
Axios.defaults.headers.post['Content-Type']='application/x-www-form-urlencoded';
Vue.prototype.$ajax=Axios;
//Axios:默认配置

// Axios.defaults.baseURL = 'http://localhost:4399/src/static';
Axios.defaults.baseURL = 'http://47.93.53.62/yq/api';


// //Axios:拦截器操作loadding
// Axios.interceptors.request.use(function(config){
//     //显示图标
//     Mint.Indicator.open({
//       text: '加载中...',
//       spinnerType: 'fading-circle'
//     });
//     return config;
// });

//默认配置


//引入全局组件需要的组件对象 开始
import HeaDer from './componets/common/header.vue';
import FooTer from './componets/common/footer.vue';


import PaginAtion from './lianxi/fenye2.vue';
//定义成全局组件或过滤器，大家都能使用 开始
Vue.component('heaDer',HeaDer); //使用最好以hea-der
Vue.component('fooTer',FooTer); //使用最好以foo-ter

Vue.component('paginAtion',PaginAtion); //使用最好以foo-ter




//引入自己的vue文件 开始
import App from './app.vue';
import Index from './componets/home/index.vue';
import Bjxx from './componets/bjxx/bjxx.vue';
import Bqgl from './componets/bqgl/bqgl.vue';
import Cysz from './componets/cysz/cysz.vue';
import Grxx from './componets/grxx/grxx.vue';
import Gjsz from './componets/gjsz/gjsz.vue';
import Kbsz from './componets/kbsz/kbsz.vue';
import Xq from './componets/xq/xq.vue';
import Xqdt from './componets/xq/xqdt.vue';
import Xgmm from './componets/changemm/xgmm.vue';
import Yqfx from './componets/yqfx/yqfx.vue';
import Yqjc from './componets/ygjc/yqjc.vue';
import Yqjclb from './componets/ygjc/yqjclb.vue';
import Yqyj from './componets/yqyj/yqyj.vue';
import Yqyjlb from './componets/yqyj/yqyjlb.vue';
import Yqbg from './componets/yqbg/yqbg.vue';
import Yqbgyl from './componets/yqbg/yqbgyl.vue';
import Login from './componets/login/login.vue';


import Fenye from './lianxi/fenye3.vue';
import Fengye from './lianxi/fenye.vue';


//vuerouter:配置
let router=new Router({
    routes:[
        //vuerouter 配置路由规则
        {path:'/',redirect:{name:'login'}},//重定向
        {name:'index',path:'/index',component:Index},//首页
        {name:'bjxx',path:'/bjxx',component:Bjxx},//编辑信息
        {name:'bqgl',path:'/bqgl',component:Bqgl},//标签管理
        {name:'cysz',path:'/cysz',component:Cysz},//常用设置
        {name:'grxx',path:'/grxx',component:Grxx},//个人信息
        {name:'gjsz',path:'/gjsz',component:Gjsz},//高级设置
        {name:'kbsz',path:'/kbsz',component:Kbsz},//快报设置
        {name:'xq',path:'/xq',component:Xq},//详情
        {name:'xqdt',path:'/xqdt',component:Xqdt},//详情大图
        {name:'xgmm',path:'/xgmm',component:Xgmm},//修改密码
        {name:'yqfx',path:'/yqfx',component:Yqfx},//舆情分析
        {name:'yqjc',path:'/yqjc',component:Yqjc},//舆情监测
        {name:'yqjclb',path:'/yqjclb',component:Yqjclb},//舆情监测lb 
        {name:'yqyj',path:'/yqyj',component:Yqyj},//舆情预警  
        {name:'yqyjlb',path:'/yqyjlb',component:Yqyjlb},//舆情预警lb  
        {name:'yqbg',path:'/yqbg',component:Yqbg},//舆情报告  
        {name:'yqbgyl',path:'/yqbgyl',component:Yqbgyl},//舆情报告yl
        {name:'login',path:'/login',component:Login},//登录



        {name:'fenye',path:'/fenye',component:Fenye},//分页
        {name:'fengye',path:'/fengye',component:Fengye}//分页
    ],
    linkExactActiveClass: 'active'
});



new Vue({
    el:'#app',
    router,
    render:c => c(App)
})
